package Model;

public class Forest {

    private String forestName;
    private String forestLocation;
    private int forestSize;
    private int forestAge;
    private Owner forestOwner;
    private Tree tree;


    public Forest(String forestName, String forestLocation, int forestSize, int forestAge) {
        this.forestName = forestName;
        this.forestLocation = forestLocation;
        this.forestSize = forestSize;
        this.forestAge = forestAge;

        forestOwner = null;
        tree = null;
    }

    public Owner getForestOwner() {
        return forestOwner;
    }

    public void setForestOwner(Owner forestOwner) {
        this.forestOwner = forestOwner;
    }

    public String getForestName() {
        return forestName;
    }

    public void setForestName(String forestName) {
        this.forestName = forestName;
    }

    public String getForestLocation() {
        return forestLocation;
    }

    public void setForestLocation(String forestLocation) {
        this.forestLocation = forestLocation;
    }

    public int getForestSize() {
        return forestSize;
    }

    public void setForestSize(int forestSize) {
        this.forestSize = forestSize;
    }

    public int getForestAge() {
        return forestAge;
    }

    public void setForestAge(int forestAge) {
        this.forestAge = forestAge;
    }

    public Tree getTree() {
        return tree;
    }

    public void setTree(Tree tree) {
        this.tree = tree;
    }

    public void printTree(Tree t){
        if (t != null){
            t.printTree();
        }
    }

    public void printForest(){
        System.out.print("Name: " + getForestName());
        System.out.print("Location: " + getForestLocation());
        System.out.print("Size: " + getForestSize());
        System.out.print("Age: " + getForestAge());

        if(forestOwner != null){
            forestOwner.printOwner();
        }

        printTree(new Tree("Test", 12, 12, 12, 12));

    }
}




